﻿namespace MagicWorld.OOP.Model
{
    /// <summary>
    /// 武器
    /// </summary>
    public abstract class Weapon
    {
        public Weapon(long damage, DamageType damageType)
        {
            Damage = damage;
            DamageType = damageType;
        }

        /// <summary>
        /// 伤害值
        /// </summary>
        public long Damage { get; set; }

        /// <summary>
        /// 伤害属性
        /// </summary>
        public DamageType DamageType;
    }

    /// <summary>
    /// 剑
    /// </summary>
    public class Sword : Weapon
    {
        public Sword(long damage, DamageType damageType) : base(damage, damageType)
        {
        }
    }

    /// <summary>
    /// 法杖
    /// </summary>
    public class Staff : Weapon
    {
        public Staff(long damage, DamageType damageType) : base(damage, damageType)
        {
        }
    }

    public enum DamageType
    {
        /// <summary>
        /// 物理
        /// </summary>
        Physical,

        /// <summary>
        /// 火
        /// </summary>
        Fire,

        /// <summary>
        /// 冰
        /// </summary>
        Ice
    }
}